feat: 引入 ToolManager 权限执行骨架与统一 Action 模型#109
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
14 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
围绕 #98 / #106,本次先落地工具与安全方向的第一阶段基础骨架。
是先把统一执行入口、统一权限模型和后续扩展点立住,避免后续继续在 runtime / tools 间重复重构。
本次改动
internal/securityAction模型与Decision/Rule/PermissionEnginePermissionEngine.Check(Action)ToolManager抽象WorkspaceSandbox先提供显式骨架与 noop 实现,为后续目录边界与敏感路径保护预留插口tools.Managerbashfilesystem_read_filefilesystem_write_filefilesystem_editfilesystem_grepfilesystem_globwebfetchmcp.servermcp.server.tool影响
测试
已补充并通过以下测试:
internal/securityinternal/toolsinternal/runtimeinternal/app本地验证:
go test ./...Refs